/**
 * Created by Administrator on 2016/3/2.
 */
gpNamespace.GpGameScene = cc.Scene.extend({
    ctor:function(){
        this._super();

        this.init();
    },

    init:function(){
    	cc.spriteFrameCache.addSpriteFrames(gpNamespace.pdkgamesenceRes.Pdkgamesence_plist);
    	//原来的game_plist中有部分资源（聊天dialog弹窗等）
//    	cc.spriteFrameCache.addSpriteFrames(gpNamespace.gameRes.Game_plist);
    	//道具
//    	cc.spriteFrameCache.addSpriteFrames(gpNamespace.djRes.Dj_plist);
    	cc.spriteFrameCache.addSpriteFrames(gpNamespace.pdkgameTweenRes.game_tween_plist);
    	//各种头像
    	//cc.spriteFrameCache.addSpriteFrames(gpNamespace.uxtxRes.Uxtx_plist);
    	//cc.spriteFrameCache.addSpriteFrames(gpNamespace.uxtxRes.Uxtx1_plist);
    	//原来的用户信息资源
//    	cc.spriteFrameCache.addSpriteFrames(gpNamespace.innerUserInfoRes.InnerUserInfo_plist);
//  	cc.SpriteFrameCache.addSpriteFrames(gpNamespace.pdkgameTweenRes.game_tween_plist);
		cc.spriteFrameCache.addSpriteFrames(gpNamespace.gameDialogRes.game_dialog_plist);
    	cc.spriteFrameCache.addSpriteFrames(gpNamespace.xinzengRes.xinzeng_plist);
    	//臭鸡蛋、鲜花动画
    	ccs.armatureDataManager.addArmatureFileInfo(
    			gpNamespace.choujidanAnimationRes.choujidan_png,
    			gpNamespace.choujidanAnimationRes.choujidan_plist,
    			gpNamespace.choujidanAnimationRes.choujidan_json);

		ccs.armatureDataManager.addArmatureFileInfo(//开局动画
			gpNamespace.gameBeginAnimationRes.gameBegin_png,
			gpNamespace.gameBeginAnimationRes.gameBegin_plist,
			gpNamespace.gameBeginAnimationRes.gameBegin_json);

		ccs.armatureDataManager.addArmatureFileInfo(//等人动画
			gpNamespace.gameWaitingAnimationRes.gameWaiting_png,
			gpNamespace.gameWaitingAnimationRes.gameWaiting_plist,
			gpNamespace.gameWaitingAnimationRes.gameWaiting_json);
    },

    onEnter:function(){
    	this._super();
    	cc.audioEngine.stopMusic();
//    	gpNamespace.SoundManager.playMusic(gpNamespace.soundRes.GameMusic, true);
    	cc.audioEngine.playMusic(gpNamespace.soundRes.GameMusic, true);
        var pdkPrepareGameLayer = new gpNamespace.GpPrepareGameLayer();
        this.addChild(pdkPrepareGameLayer, 1, gpNamespace.GamePrepareLayerName);
        

        //var cddMyTitleLayer = new gpNamespace.CddMyTitleLayer();
        //this.addChild(cddMyTitleLayer);

        //var cddNoplayLayer = new gpNamespace.CddNoplayLayer();
        //this.addChild(cddNoplayLayer);
    }
});